home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / mac / Ad / Mod04 / Shop / jigsaw.Dir / 00041.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  839 b   |  31 lines

  1. on startMovie
  2.   set HC to the number of cast "handCursor"
  3.   cursor([HC, HC + 1])
  4. end
  5.  
  6. on mouseUp
  7.   if the clickOn <> 0 then
  8.     set horiz to the locH of sprite the clickOn
  9.     set vert to the locV of sprite the clickOn
  10.     set snapH to integer(word the clickOn - 1 of field "hLocs")
  11.     set snapV to integer(word the clickOn - 1 of field "vLocs")
  12.     if (abs(horiz - snapH) < 10) and (abs(vert - snapV) < 10) then
  13.       set the locH of sprite the clickOn to snapH
  14.       set the locV of sprite the clickOn to snapV
  15.       checkLocs()
  16.     end if
  17.   end if
  18. end
  19.  
  20. on checkLocs
  21.   set allInPlace to 1
  22.   repeat with i = 2 to 21
  23.     if (the locH of sprite i <> word i - 1 of field "hlocs") or (the locV of sprite i <> word i - 1 of field "vlocs") then
  24.       set allInPlace to 0
  25.     end if
  26.   end repeat
  27.   if allInPlace then
  28.     go("end")
  29.   end if
  30. end
  31.